package com.zc.controller;

import com.zc.service.mq.RabbitMQProducer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description:
 * @author: cong
 * @create: 2025/3/12
 */
@RestController
public class MQController {

    @Autowired
    private RabbitMQProducer rabbitMQProducer;

    @PostMapping("/sendMessage/{message}")
    public String sendMessage(@PathVariable String message) {
        rabbitMQProducer.sendMessage(message);
        return "success";
    }
}
